// 发表评论
$(function () {
    function getcommentpost(content) {
        $.ajax({
            method: 'POST',
            url: '/api/comment/post',

            data: {
                valueId: new URLSearchParams(location.search).get('id'),
                typeId: 1,
                content: content
            },
            success: function (res) {
                console.log(res);
                location.href = './topicDetail.html?id=' + new URLSearchParams(location.search).get('id')
            }

        })
    }



    $(".post").on("click", () => {
        const ipt = $('.content').val()
        getcommentpost(ipt)

    })
})